<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title>Assessment</title>
    </head>
    <body>
    <g:render template="/shared/navigation" />
    
    <div id="body">
    
    <h1>Submit</h1>

    <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
    </g:if>

    <p>Are you sure you want to submit your test answers?</p><br/>
    <p>
    You wont be able to change your answers after you click submit button below.<br/>
    Or if you have chance to change the answers, change the page from the page navigator at the end of this page. 
    </p>
    
    <br/>
    
    <g:form action="finish" method="post" style="display: inline">
    <input type="submit" value="Submit Result" />
    </g:form>
    
    <br/>
    
    <br/>
    
    <div id="mainPageNav">
<g:form action="index" method="post" style="display: inline">
    <g:hiddenField name="page" value="${maxPage-1}" />
    <input type="submit" value="Previous" />
</g:form>

&nbsp;

<g:form action="index" method="post" style="display: inline">
<select id="pageNav" name="page" onchange="this.form.submit()">
<optgroup label="Select Page:">
<g:each var="i" in="${(0..<maxPage)}">
<option value="${i}" ${i == currentPage-1 ? 'selected="selected"' : ''} }>Page ${i+1}</option>
</g:each>
</optgroup>
<optgroup label="----------">
<option value="submit" ${"submit" == currentPage ? 'selected="selected"' : ''} }>Submit</option>
</optgroup>
</select>
</g:form>

&nbsp;

<g:form action="index" method="post" style="display: inline">
    <input type="submit" value="Next"  disabled="disabled" />
</g:form>
	</div>
    
    </div>

    </body>
</html>